import java.util.Comparator;

/**
 * Created by ospip on 2017/11/29.
 * Copyright (c) 2017 LLAP. All rights reserved.
 */
public class UserComparator implements Comparator<User> {
    @Override
    public int compare(User o1, User o2) {
        int ret = o2.getPriority() - o1.getPriority();
        if (ret == 0) return o1.getOrder() - o2.getOrder();
        return ret;
    }
}
